package com.macken.wowadmin.entity;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

public class HostInfo {
	public int hostId;
	public String ip;
	public int port;
	public String note;
	public int getHostId() {
		return hostId;
	}
	public void setHostId(int hostId) {
		this.hostId = hostId;
	}
	public String getIp() {
		return ip;
	}
	public void setIp(String ip) {
		this.ip = ip;
	}
	public int getPort() {
		return port;
	}
	public void setPort(int port) {
		this.port = port;
	}
	public String getNote() {
		return note;
	}
	public void setNote(String note) {
		this.note = note;
	}
	
	public static RowMapper<HostInfo> rowMapper=new RowMapper<HostInfo>() {
		
		public HostInfo mapRow(ResultSet rs, int rowNum) throws SQLException {
			HostInfo host=new HostInfo();
			host.hostId=rs.getInt("host_id");
			host.ip=rs.getString("ip");
			host.port=rs.getInt("port");
			host.note=rs.getString("note");
			return host;
		}
	};
}	
